<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>活动添加页面</title>
    <link rel="stylesheet" href="../../../yl/index.css" />
    <!-- 布局样式 -->
    <link rel="stylesheet" href="../../../yl/style.css" />
    <link rel="stylesheet" href="../../../style/wangeditor.css">
    <link rel="stylesheet" href="../../../yl/mobile.css" />
    <link rel="stylesheet" href="../../../yl/easyui.css" />
    <link rel="stylesheet" href="../../../yl/icon.css" />
</head>

<body>
    <!-- <div id="app"> -->
    <div class="easyui-navpanel" id="app" v-cloak>
        <header>
            <div class="m-toolbar">
                <div class="m-title">{{action=='Add'?'添加志愿者活动信息':action=='Modify'?(type == '1'?'查看':'上传')  +'志愿者活动总结':''}}</div>
            </div>
        </header>
        <div class="easyui-navpanel panel-body panel-body-nobottom panel-body-noborder" style="height: 3000px"
            id="MainTable" ref="MainTable"
            :data-options="JSON.stringify({ 'TableName': 'volunteer_teams_activities', 'form': 'dataForm' ,'primary_key':'Volunteer_Teams_Activities_SerialNumber' })">
            <div class="yl-main">
                <div class="table_titel">
                    <div class="titel">活动信息</div>
                </div>
                <el-form :model="dataForm" ref="form" :inline-message="true" style="width: 100%">
                    <el-descriptions :column="1" size="large" border>
                        <el-descriptions-item>
                            <template #label>
                                <div class="cell-item">举办团队</div>
                            </template>
                            <el-form-item :rules="[{ required: true, message: '请选择举办团队', trigger: 'blur' }]"
                                prop="Activities_Name">
                                <el-select disabled @change="changeVolunteer" clearable
                                    v-model.trim="dataForm.Volunteer_Team_SerialNumber" placeholder="请选择举办团队" filterable
                                    style="width: 100%">
                                    <el-option v-for="(item,index) in volunteer_teams" :key="index"
                                        :label="item.Volunteer_Team_Name"
                                        :value="item.Volunteer_Team_SerialNumber"></el-option>
                                </el-select>
                            </el-form-item>
                        </el-descriptions-item>
                        <el-descriptions-item>
                            <template #label>
                                <div class="cell-item">活动名称</div>
                            </template>
                            <el-form-item :rules="[{ required: true, message: '请输入活动名称', trigger: 'blur' }]"
                                prop="Activities_Name">
                                <el-input disabled v-model="dataForm.Activities_Name" class="borderless-input"
                                    placeholder="请输入活动名称" />
                            </el-form-item>
                        </el-descriptions-item>
                        <el-descriptions-item>
                            <template #label>
                                <div class="cell-item">活动时间</div>
                            </template>
                            <el-form-item :rules="[{ required: true, message: '请选择活动时间', trigger: 'change' }]"
                                prop="Activity_Datetime">
                                <el-date-picker disabled v-model="dataForm.Activity_Datetime" type="datetime"
                                    placeholder="请选择活动时间" class="borderless-input" format="YYYY-MM-DD HH:mm:ss"
                                    value-format="YYYY-MM-DD HH:mm:ss" size="large" />
                            </el-form-item>
                        </el-descriptions-item>
                        <el-descriptions-item>
                            <template #label>
                                <div class="cell-item">活动地点</div>
                            </template>
                            <el-form-item :rules="[{ required: true, message: '请输入活动地点', trigger: 'blur' }]"
                                prop="Activity_Location">
                                <el-input disabled v-model="dataForm.Activity_Location" class="borderless-input"
                                    placeholder="请输入活动地点" />
                            </el-form-item>
                        </el-descriptions-item>
                        <el-descriptions-item>
                            <template #label>
                                <div class="cell-item">活动内容</div>
                            </template>
                            <el-form-item :rules="[{ required: true, message: '请输入活动内容', trigger: 'blur' }]"
                                prop="Activity_Content">
                                <el-input disabled type="textarea" :autosize="{ minRows: 2}"
                                    v-model="dataForm.Activity_Content" class="borderless-input"
                                    placeholder="请输入活动内容" />
                            </el-form-item>
                        </el-descriptions-item>
                    </el-descriptions>
                </el-form>
                <div id="ChildTable">
                    <div class="table_titel">
                        <div class="titel">总结</div>
                    </div>
                    <el-descriptions :column="1" size="large" border v-if="type == '0'"
                        :data-options="JSON.stringify({ 'TableName': 'volunteer_teams_activities_summary', 'form': 'childDataForm', 'ParentTableName': 'volunteer_teams_activities'})">
                        <el-descriptions-item>
                            <template #label>
                                <div class="cell-item">上传会议总结</div>
                            </template>
                            <el-upload class="upload-demo" :drag="true" action="#" :auto-upload="false"
                                :show-file-list="true" :on-change="handleChange" :on-remove="handleRemove"
                                :file-list="fileList">
                                <i class="el-icon-upload"></i>
                                <div class="el-upload__text">将文件拖到此处上传，待点击<em>提交</em>后保存</div>
                            </el-upload>
                        </el-descriptions-item>
                    </el-descriptions>
                    <el-table id="table" v-if="type == '1'" border max-height="450" tooltip-effect="dark"
                        :data="childDataForm.filter(i => i.Row_Status != '1')">
                        <el-table-column min-width="180" prop="Activity_Summary_SerialNumber" label="附件流水号"></el-table-column>
                        <el-table-column min-width="180" prop="Activity_Name" label="附件名称"></el-table-column>
                        <el-table-column min-width="180" prop="Activity_Summary_URL" label="磁盘文件名"></el-table-column>
                        <el-table-column width="200" fixed="right" align="center" label="操作">
                            <template v-slot="{row}">
                                <el-button type="primary" size="small" @click="preview(row)">
                                    在线预览
                                </el-button>
                                <el-button type="success" size="small" @click="download(row)">
                                    下载附件
                                </el-button>
                            </template>
                        </el-table-column>
                    </el-table>
                </div>
            </div>
            <yl-online-preview :file-url="fileUrl" v-model="showDialog"></yl-online-preview>
        </div>
        <footer class="botton-ann">
            <el-button @click="goBack">返回</el-button>
            <el-button type="primary"  v-if="type == '0'" :loading="loading" plain @click="handleSubmit">提交</el-button>
        </footer>
    </div>
</body>
<script src="../../../utils/utils.js"></script>
<script src="../../../config/config.js"></script>
<script src="../../../utils/compressor.js"></script>
<script src="../../../utils/wangeditor.js"></script>
<script src="../../../utils/mixins.js"></script>
<script src="../../../yl/vue.js"></script>
<script src="../../../yl/index.js"></script>
<script src="../../../yl/zh-cn.mjs"></script>
<script src="../../../yl/index.iife.min.js"></script>
<script src="../../../yl/jquery.min.js"></script>
<script src="../../../utils/jquery.cookie.js"></script>
<script src="../../../yl/jquery.easyui.min.js"></script>
<script src="../../../yl/jquery.easyui.mobile.js"></script>
<script src="../../../yl/moment.min.js"></script>
<script src="../../../api/request.js"></script>
<script src="./js/add1.js"></script>

</html>